package com.demo.dto;

import com.demo.pojo.Project;
import com.demo.pojo.Stage;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


/**
 * @ClassName StageDto
 * @Description TODO
 * @Author Windy
 * @Date 2022/9/2 14:22
 * @Version 1.0
 **/
@Data
public class StageDto {
    private String sid;
    private String sname;
    private String starttime;
    private String endtime;
    private int pid;
    private String updateTime;
    private int status;
    private Project project;

    public void setStage(Stage stage){
        sid = stage.getSid();
        sname = stage.getSname();
        starttime = stage.getStarttime();
        endtime = stage.getStarttime();
        pid = stage.getPid();
        updateTime = stage.getUpdateTime();
        status = stage.getStatus();
    }

    public String getSid() {
        return sid;
    }

    public void setSid(String sid) {
        this.sid = sid;
    }

    public String getSname() {
        return sname;
    }

    public void setSname(String sname) {
        this.sname = sname;
    }

    public String getStarttime() {
        return starttime;
    }

    public void setStarttime(String starttime) {
        this.starttime = starttime;
    }

    public String getEndtime() {
        return endtime;
    }

    public void setEndtime(String endtime) {
        this.endtime = endtime;
    }

    public int getPid() {
        return pid;
    }

    public void setPid(int pid) {
        this.pid = pid;
    }

    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public Project getProject() {
        return project;
    }

    public void setProject(Project project) {
        this.project = project;
    }

    public StageDto(String sid, String sname, String starttime, String endtime, int pid, String updateTime,
                    int status, Project project) {
        this.sid = sid;
        this.sname = sname;
        this.starttime = starttime;
        this.endtime = endtime;
        this.pid = pid;
        this.updateTime = updateTime;
        this.status = status;
        this.project = project;
    }

    public StageDto() {
    }

    @Override
    public String toString() {
        return "StageDto{" +
                "sid='" + sid + '\'' +
                ", sname='" + sname + '\'' +
                ", starttime='" + starttime + '\'' +
                ", endtime='" + endtime + '\'' +
                ", pid=" + pid +
                ", updateTime='" + updateTime + '\'' +
                ", status=" + status +
                ", project=" + project +
                '}';
    }
}
